/**
 * 网络请求出口API, 统一导出
 */

import { GET, POST } from './instance';

import teacher from "./server";

// =================================== 公有API ===================================
/**
 * @method 教师账号注册
 * @param {String} account          注册账号名称
 * @param {String} password         注册账号密码
 * @param {String} confirmPassword  密码二次确认
 */
const register = (account, password, confirmPassword) => POST(`/user/register`, { account, password, confirmPassword });

/**
 * @method 教师账号登录
 * @param {String} account      账号名称
 * @param {String} password     账号密码
 */
const login = (account, password) => POST(`/user/login`, { account, password });

// * 统一出口
export default {
  login,
  register,
  teacher,
}
